package com.cssl.client;

import com.cssl.pojo.Booklevel;
import com.cssl.pojo.Location;
import com.cssl.pojo.Published;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "gateway",path = "book")
public interface BookinformationClient {
    @PostMapping("/selbname")
    public Booklevel selbname(@RequestParam(value = "bid") int bid);

    @PostMapping("/selpname")
    public Published selpname(@RequestParam(value = "pid")int pid);

    @PostMapping("/selwei")
    public Location selwei(@RequestParam(value = "lid") int lid);

    @PostMapping("/booklevelall")
    public List<Booklevel> booklevelall();

    @PostMapping("/licationall")
    public List<Location> locationall();

    @PostMapping("/publishedall")
    public List<Published> publishedall();

    @PostMapping("/updid")
    public boolean updid(@SpringQueryMap Booklevel bl);

    //按id修改
    @PostMapping("/updlid")
    public boolean updlid(@SpringQueryMap Location lt);


}
